#!/bin/bash
  DATABK="/home/print3D/printer_data"
  echo -e "######安装配置!#####"
  wget https://gitee.com/xiaoh5001/klipperocto4a/raw/master/scripts/KlipperScreen.conf   -O ${DATABK}/config/KlipperScreen.conf &>/dev/null
    if [ $? -eq 0 ]; then
        echo -e "====KlipperScreen配置安装成功!===="
   else
        echo -e "====KlipperScreen配置安装失败!===="    
  fi
  wget https://gitee.com/xiaoh5001/klipperocto4a/raw/master/scripts/moonraker.conf  -O ${DATABK}/config/moonraker.conf &>/dev/null
    if [ $? -eq 0 ]; then
        echo -e "====月耙配置安装成功!===="
   else
        echo -e "====月耙配置安装失败!===="    
  fi
  wget https://gitee.com/xiaoh5001/klipperocto4a/raw/master/scripts/printer.cfg  -O ${DATABK}/config/printer.cfg &>/dev/null 
  if [ $? -eq 0 ]; then
        echo -e "====打印机配置安装成功!===="
  else
        echo -e "====打印机配置安装失败!===="    
  fi
  [[ -d /root/extensions/KlipperScreen} ]] && rm -rf /root/extensions/KlipperScreen
  mkdir -p /root/extensions/KlipperScreen
  if [ $? -eq 0 ]; then
        echo -e "====安装检测位成功!===="
  else
        echo -e "====安装检测位失败!====" 
  fi

#rm -rf /home/print3D/kiauh
echo -e "######安装完成!#####"